<?php 
/*************************************
** Crypt/Decrypt String.
** By wdammak
*************************************/

 $key = "talendSupportSMS";
 //$iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_CBC);
 //$iv = mcrypt_create_iv($iv_size, MCRYPT_DEV_URANDOM);
 define('IV', base64_decode('rDoA8ZnnNCM='));

 //encodes the string
 function babili_crypt($string){
 	global $key;
	//global $iv;
	return base64_encode(mcrypt_encrypt(MCRYPT_BLOWFISH, $key, $string, MCRYPT_MODE_CBC, IV));
 }
 
 //decodes a string
 function babili_decrypt($enc){
 	global $key; 
	//global $iv; 			
	return trim(mcrypt_decrypt(MCRYPT_BLOWFISH, $key, base64_decode($enc), MCRYPT_MODE_CBC, IV));
 }
?>